﻿using System;
using NHibernate.Mapping.ByCode;
using SellAndBuy.Application.Query.DTOs;

namespace SellAndBuy.Infrastructure.Data.Query.Mappings
{
    public class ItemConditionDTOMap
    {
        public static Action<IComponentMapper<ItemConditionDTO>> Mapping()
        {
            return c => c.Property(p => p.Name, map => { map.Length(150); map.NotNullable(true);});
        }

        public static Action<IComponentElementMapper<ItemConditionDTO>> MappingElements()
        {
            return c => c.Property(p => p.Name, map => { map.Length(150); map.NotNullable(true); });
        }
    }
}